import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);
export default new Vuex.Store({
    state: {
        // imgUrlPix: 'https://exam_dev.jhbrain.cn/img',
        imgUrlPix: 'https://exam.jhbrain.cn/img',
        user: false
    },
    mutations: {
        login(state) {
            state.user = true;
            localStorage.setItem("userLoginBoolean", true);
        },
        logout(state) {
            state.user = false;
            localStorage.setItem("userLoginBoolean", false);
        }
    }
})
